package cn.dubito.miaosha.dao;

import cn.dubito.miaosha.domain.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @author liliang
 * @description:
 * @date 2018/3/28.
 */
@Mapper
public interface UserDao {

    @Select("select * from user where id = #{id}")
    public User getById(@Param("id") Integer id);

    @Insert("insert into user(id,name) values(#{id},#{name})")
    void insert(User user);
}
